<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Data types</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="Chapter 1. The Variadic Macro Data Library 1.10">
<link rel="up" href="../index.html" title="Chapter 1. The Variadic Macro Data Library 1.10">
<link rel="prev" href="vmd_detail.html" title="Functional groups">
<link rel="next" href="vmd_specific_generic.html" title="Macros for working with data types">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="vmd_detail.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vmd_specific_generic.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="variadic_macro_data.vmd_data_types"></a><a class="link" href="vmd_data_types.html" title="Data types">Data types</a>
</h2></div></div></div>
<p>
      The VMD library has functionality for testing and parsing preprocessor data.
    </p>
<p>
      The C++ preprocessor defines preprocessor data as preprocessing tokens. The
      types of preprocessing tokens can be seen in section 2.5 of the C++ standard
      document.
    </p>
<p>
      The VMD library works with a subset of two of these types of preprocessor tokens
      as "data types". These are the "identifier" and "pp-number"
      preprocessor tokens. The preprocessor token types which VMD cannot parse are:
    </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
          header-name
        </li>
<li class="listitem">
          character-literal
        </li>
<li class="listitem">
          user-defined-characteral-literal
        </li>
<li class="listitem">
          string-literal
        </li>
<li class="listitem">
          user-defined-string-literal
        </li>
<li class="listitem">
          preprocessing-op-or-punc
        </li>
</ul></div>
<p>
      Even though VMD cannot parse these preprocessor token types, it is still a
      very useful library since a very large part of macro programming works with
      'identifier' and 'pp-number' tokens.
    </p>
<p>
      VMD identifiers are preprocessing tokens consisting of alphanumeric characters
      and the underscore ( _ ) character. This is very similar to a preprocessor
      token "identifier" with the difference being that a VMD identifier
      can start with a numeric character, allowing VMD identifiers to also be positive
      integral literals. VMD offers functionality for parsing VMD identifiers both
      as a separate element or in a sequence of preprocessing tokens.
    </p>
<p>
      VMD numbers are Boost PP numbers, ie. preprocessing tokens of whole numbers
      between 0 and BOOST_PP_LIMIT_MAG ( defaulting to 256 ) inclusive. These are
      a small subset of preprocessor token "pp-number". VMD offers functionality
      for parsing numbers both as a separate element or in a sequence of preprocessing
      tokens. A VMD number is really a subset of VMD identifiers for which VMD offers
      specific functionality. The Boost PP library has it own extensive support for
      numbers, which VMD does not duplicate.
    </p>
<p>
      VMD v-types are, like numbers, a subset of VMD identifiers consisting of identifiers
      beginning with BOOST_VMD_TYPE_ followed by a data type mnemonic. Each v-type
      can be recognized by VMD functionality and therefore passed or returned by
      macros. Like any identifier a v-type can be parsed both as a separate element
      or in a sequence of preprocessing tokens.
    </p>
<p>
      VMD can also test for emptiness, or the absence of any preprocessing tokens
      when passed as macro input or returned from a macro.
    </p>
<p>
      The Boost PP library supports four individual composite data types. These are
      arrays, lists, seqs, and tuples. These data types are recognized and supported
      by VMD. A further data type supported by Boost PP is variadic data, which is
      a comma separated grouping of preprocessor elements. VMD has no special support
      for variadic data outside of what is already in Boost PP.
    </p>
<p>
      VMD has functionality to work with the four Boost PP high-level data types.
      VMD can test the Boost PP data types and parse them in a sequence of preprocessor
      tokens.
    </p>
<p>
      VMD can also parse sequences. A sequence consists of zero or more other top-level
      data types already mentioned represented consecutively. As such a sequence
      represents any data type which VMD can parse since it can consist of emptiness,
      a single data type, or multiple data types represented consecutively.
    </p>
<p>
      Emptiness, the three identifier types, the four Boost PP composite data types,
      and VMD sequences are the data types which VMD understands. Other low-level
      preprocessor data types can of course be used in macro programming but VMD
      cannot parse such preprocessor data.
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2010-2017 Tropic Software
      East Inc</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="vmd_detail.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="vmd_specific_generic.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
